package tom.client.admin;

import java.util.List;

import tom.shared.AppUser;
import tom.shared.Company;
import tom.shared.Program;
import tom.shared.PostCode;

import com.google.gwt.user.client.rpc.RemoteService;

public interface Service extends RemoteService {
	public PostCode selectPostCode(Integer id);

	public boolean deletePostCode(Integer id);

	public boolean insertPostCode(PostCode record);

	public boolean updatePostCode(PostCode record);

	public Company selectCompany(String comCode);

	public boolean deleteCompany(String comCode);

	public boolean insertCompany(Company record);

	public boolean updateCompany(Company record);

	public boolean updateAppUser(String userName, String fullName,
			String descript, String comCode, Integer level);

	public boolean createUser(String userName, String fullName,
			String descript, String comCode, Integer level);

	public boolean updatePassword(String userName, String oldPswd,
			String newPswd);

	public boolean updatePassword2(String userName, String oldPswd,
			String newPswd);
	
	public boolean deleteAppUser(String userName);

	public AppUser selectMyInfo(String userName);

	public List<String> selectModule();

	public Program selectForm(String formId);

	public boolean deleteForm(String formid);

	public boolean insertForm(Program record);

	public boolean updateForm(Program record);

	public boolean insertWorking(String userName, String comCode);
	
	public boolean deleteWorking(String userName, String comCode);

	public List<String> selectWorking(String userName);

	public List<Program> selectPermission(String userName, String comCode);

	public List<Program> selectAvailForm(String userName, String comCode);

	public boolean deletePermission(String userName, String comCode, String formId);

	public boolean insertPermission(String userName, String comCode, String formId,
			Integer level);
}
